import request from "@/utils/request";
export const getRoles = params => {
    return request({
        url: "/admin/api/rest/roles",
        params,
    });
};
export const addRole = data => {
    return request({
        url: "/admin/api/rest/roles",
        method: "POST",
        data,
    });
};
export const updateRole = data => {
    return request({
        url: "/admin/api/rest/roles",
        method: "PATCH",
        data,
    });
};
export const deleteRole = data => {
    return request({
        url: "/admin/api/rest/roles",
        method: "DELETE",
        data,
    });
};
export const getMenusInRole = params => {
    return request({
        url: "/admin/api/role/menusInRole",
        params,
    });
};
export const addRefMenu = data => {
    return request({
        url: "/admin/api/role/addRefMenu",
        method: "POST",
        data,
    });
};
export const deleteRefMenu = data => {
    return request({
        url: "/admin/api/role/deleteRefMenu",
        method: "DELETE",
        data,
    });
};
export const getInterfacesInRole = params => {
    return request({
        url: "/admin/api/role/interfacesInRole",
        params,
    });
};
export const addRefInterface = data=>{
    return request({
        url: "/admin/api/role/addRefInterface",
        method: "POST",
        data
    })
}
export const deleteRefInterface = data=>{
    return request({
        url: "/admin/api/role/deleteRefInterface",
        method: "DELETE",
        data
    })
}